<?php
/**
 *  Ensures this file is being included by a parent file
 */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');

/**
 * Install function
 */
function com_install() {
    global $database, $mosConfig_absolute_path;

    // update the menus
    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/mts_icon.gif')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_link='.$database->Quote('option=com_mts&task=mts')
        .' WHERE link = '.$database->Quote('option=com_mts'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/mts_icon.gif')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts&task=mtsws'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/sysinfo.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts&task=mtsdia'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts&task=mtsdpa'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts&task=mtsfpa'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts&task=mtsico'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts&task=mtsimo'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts&task=mtsima'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/maindb.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts&task=mtsdbo'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_mts/images/mts_icon.gif')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_mts&task=mtsabout'));
    $database->query();


} // com_install()
